home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / cnet / 1ooadcps.lha / AD_CPS.REXX < prev    next >
OS/2 REXX Batch file  |  1995-09-06  |  5KB  |  39 lines

  1. /*
  2.              $VER: AD_CPS, v1.0 (06-Sep-95) by Adolescent/1oo%
  3.                  _____.  __________.  __________. __ _____
  4.                 /     |_/   ___    |_/   ___    | \//    /
  5.                 |     ||     \/    ||     \/    |  /    /
  6.                 |     ||     /     ||     /     | /    /__
  7.                 |____/~|__________/~|__________/~ \___/ \/
  8.  
  9.                         CPS rater tool for CNet/3.
  10.  
  11.      Thanks to unknown ASCii bro for this cool digital number stuph...       */
  12.  
  13. options results;signal on SYNTAX;signal on ERROR;signal on IOERR;tr=transmit;se=sendstring;gc=getchar;gu=getuser;mg=maygetchar;a='rexxsupport.library';if ~show('l',a) then if ~addlib(a,0,-30) then exit
  14.  
  15. /* edit the following to make it look luv-lee on your own board */
  16.  
  17. c.1 = 12   /* COLOR OF:  COMMENT     */
  18. c.2 = 10   /*         :  LED         */
  19.  
  20. com.1="What, did you type that one over?"
  21. com.2="Come on, that was a joke...  Right?"
  22. com.3="I didn't think they sold 300 baud modems still..."
  23. com.4="You could have mailed me the disk!"
  24. com.5="Zzz..."
  25. com.6="Absolutely Average..."
  26. com.7="Getting close!"
  27. com.8="Now we're getting somewhere..."
  28. com.9="Getting hotter..."
  29. com.10="Hmm, pretty quick..."
  30. com.11="I think I smell smoke!!!"
  31. com.12="Call the fire department!"
  32. com.13="Burnin' phone lines..."
  33. com.14="Smmmmmmmmokin!"
  34. com.15="I think my modem just melted!!!"
  35. com.16="Lightspeeeeeeed!"
  36. com.17="KAAA-BOOM!"
  37. com.18="TOTAL MELTDOWN!" 
  38.  
  39. cps=arg(1);if cps='' then exit;if cps='M' then signal MAKE;gu 1;hand=result;gu 24;baud=result;x=3;y=8;line.='';n.0.0='C_ _____ __';n.0.1='C/ \\___// /';n.0.2='C/ _/C/ / ';n.0.3='C_\/C\/C';n.0.4=' / \C/\C';n.0.5=' \_/C/ /C';n.0.6='/\_____ / /C';n.0.7='\_____/ \/C';n.1.0='C__';n.1.1='C/ /';n.1.2='C/ / ';n.1.3='C\/C';n.1.4='C/\C';n.1.5='C/ /C';n.1.6='C/ /C';n.1.7='C\/C';n.2.0='C_____ __';n.2.1='C\___// /';n.2.2='C/ / ';n.2.3='C_C_____ \/C';n.2.4='C/ \ \_  /C';n.2.5='C\_/   \/C';n.2.6='/\_____C';n.2.7='\_____/C';n.3.0='C_____ __';n.3.1='C\___// /';n.3.2='C/ / ';n.3.3='C_____ \/C';n.3.4='C\_  //\C';n.3.5='C\// /C';n.3.6='/\_____ / /C';n.3.7='\_____/ \/C';n.4.0='C_C__';n.4.1='C/ \C/ /';n.4.2='C/ _/C/ / ';n.4.3='C\/_____ \/C';n.4.4='C\_  //\C';n.4.5='C\// /C';n.4.6='C/ /C';n.4.7='C\/C';n.5.0='C_ _____ C';n.5.1='C/ \\___/C';n.5.2='C/ _/C';n.5.3='C\/_____C';n.5.4='C\_  //\C';n.5.5='C\// /C';n.5.6='/\_____ / /C';n.5.7='\_____/ \/C';n.6.0='C_ _____C';n.6.1='C/ \\___/C';n.6.2='C/ _/C';n.6.3='C_\/_____C';n.6.4=' / \ \_  //\C';n.6.5=' \_/   \// /C';n.6.6='/\_____ / /C';n.6.7='\_____/ \/C';n.7.0='C_____ __';n.7.1='C\___// /';n.7.2='C/ / ';n.7.3='C\/C';n.7.4='C/\C';n.7.5='C/ /C';n.7.6='C/ /C';n.7.7='C\/C';n.8.0='C_ _____ __';n.8.1='C/ \\___// /';n.8.2='C/ _/    / / ';n.8.3='C_\/_____ \/C';n.8.4=' / \ \_  //\C';n.8.5=' \_/   \// /C';n.8.6='/\_____ / /C';n.8.7='\_____/ \/C';n.9.0='C_ _____ __';n.9.1='C/ \\___// /';n.9.2='C/ _/    / / ';n.9.3='C\/_____ \/C';n.9.4='C\_  //\C';n.9.5='C\// /C';n.9.6='C/ /C';n.9.7='C\/C';sendfile 'systext:sys.cps';l=length(cps);if l=5 then y=15;if l=4 then y=15;if l=3 then y=27;tr 'c'c.2'}';do p=0 to 7;do z=1 to l;w=substr(cps,z,1);line.p=line.p||n.w.p'D';end;tr at(x,y)line.p;x=x+1;end;rate=((CPS/baud)*100)%1;r=rate%10;if ~exists('sysdata:log/ad_cps.top') then call MAKE;text=com.r;if r<1 then text=com.1;if r>18 then text=com.18;tr 'c7n1'center(cps' cps at 'baud'0 equals cf'rate'%c7 efficiency.',84)'n1';tr 'c'c.1'}'center(text,78);call open(file,'sysdata:log/ad_cps.top','R');do a=1 to 12;data=readln(file);parse var data bps.a '@' top.a '@' use.a;end;call close(file);do a=1 to 12;if baud=bps.a&cps>top.a then signal HI;end;do a=1 to 12;if baud=bps.a then tr 'n1c6'center('The record for 'baud'0 is 'top.a' cps set by 'use.a'.',78);end;exit;HI:;tr 'n1cb'center('You smashed the old record of 'top.a' cps, set by 'use.a'.',78);top.a=cps;use.a=hand;call open(file,'sysdata:log/ad_cps.top','W');do a=1 to 12;call writeln(file,bps.a||'@'||top.a||'@'||use.a);end;call close(file);exit;SYNTAX:;ERROR:;IOERR:;e1=' c9Errorcf: ca'rc' cf(ca'errortext(rc)'cf)';e2='  c9Linecf: ce'left(sigl,4)'c9Filecf:';gu 1311992;a=result;gu 1311960;b=result;c='cb"ce'a||b'cb"';e2=e2' 'c;tr e1;tr e2;logentry e1;logentry e2;e=sourceline(sigl);do while e~='';e3='c9Sourcecf: cd';e3=e3||left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush;exit;MAKE:;call open(file,'sysdata:log/ad_cps.top','W');call writeln(file,'240@0@Adolescent');call writeln(file,'480@0@Adolescent');call writeln(file,'960@0@Adolescent');call writeln(file,'1440@0@Adolescent');call writeln(file,'1680@0@Adolescent');call writeln(file,'1920@0@Adolescent');call writeln(file,'2160@0@Adolescent');call writeln(file,'2400@0@Adolescent');call writeln(file,'2640@0@Adolescent');call writeln(file,'2880@0@Adolescent');call writeln(file,'3120@0@Adolescent');call writeln(file,'3360@0@Adolescent');call close(file);return;AT:;return ''arg(1)';'arg(2)'H'